package com.ag.bean;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * TbConnectLogId entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Embeddable
public class TbConnectLogId implements java.io.Serializable {

	// Fields

	private String UId;
	private Date startTime;

	// Constructors

	/** default constructor */
	public TbConnectLogId() {
	}

	/** full constructor */
	public TbConnectLogId(String UId, Date startTime) {
		this.UId = UId;
		this.startTime = startTime;
	}

	// Property accessors

	@Column(name = "U_ID", nullable = false, length = 50)
	public String getUId() {
		return this.UId;
	}

	public void setUId(String UId) {
		this.UId = UId;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "START_TIME", nullable = false, length = 23)
	public Date getStartTime() {
		return this.startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TbConnectLogId))
			return false;
		TbConnectLogId castOther = (TbConnectLogId) other;

		return ((this.getUId() == castOther.getUId()) || (this.getUId() != null
				&& castOther.getUId() != null && this.getUId().equals(
				castOther.getUId())))
				&& ((this.getStartTime() == castOther.getStartTime()) || (this
						.getStartTime() != null
						&& castOther.getStartTime() != null && this
						.getStartTime().equals(castOther.getStartTime())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getUId() == null ? 0 : this.getUId().hashCode());
		result = 37 * result
				+ (getStartTime() == null ? 0 : this.getStartTime().hashCode());
		return result;
	}

}